package com.hjxr.quota.define.constant;

public class DefineConstant {

    public static final String ORACLE_PAGE="SELECT * FROM(SELECT TMP.*,ROWNUM ROW_ID FROM(%s) TMP WHERE ROWNUM <= %d) WHERE ROW_ID >= %d";
    public static final String ORACLE_PAGE_COUNT = "SELECT COUNT(0) FROM (%s)";
    public static final String MYSQL_PAGE="limit %d,%d";

    public enum DataBaseType{
        ORACLE,MYSQL,HIVE
    }

    public enum QuotaCreateTypeEnum {

        IS_DATABASE("1", "数据库表创建"),
        IS_CUSTOM("2", "自定义创建"),
        IS_QUOTA("3", "根据指标创建"),
        IS_SQL("4", "根据语句创建");

        private String code;
        private String msg;

        QuotaCreateTypeEnum(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public String getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }

    }

    public enum FormulaTypeEnum {

        IS_QUOTA("0", "指标"),
        IS_OPERATOR("1", "运算符");

        private String code;
        private String msg;

        FormulaTypeEnum(String code, String msg) {
            this.code = code;
            this.msg = msg;
        }

        public String getCode() {
            return code;
        }

        public String getMsg() {
            return msg;
        }
    }

}
